Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Mapi Sample Program
~Umberto Nongeroson 15.Jan.04 05:24 PM a Web browser
Notes Client All Releases Windows XP


I wonder what you want to achieve. Can you explain a little more? Anyway, I found this LotusScript test code. Note that MAPI has two meanings. It often refers to a limited API that is supported by many mail clients including Notes, but Microsoft also uses MAPI to refer to their proprietary Outlook-only API.


    Type CString
    data
    (255) As Long
    End Type

    ' for MAPIUser..Class
    Const MAPI_ORIG = 0
    Const MAPI_TO = 1
    Const MAPI_CC = 2
    Const MAPI_BCC = 3

    Type MAPIUser
    Reserved
    As Long
    Class As Long
    Name As Long
    Address As Long
    EIDSize As Long
    EntryID As Long
    End Type

    Type
    MAPIMessage
    Reserved
    As Long
    Subject As Long
    Body As Long
    MessageType As Long
    DateReceived As Long
    ConversationID As Long
    Flags As Long
    Originator As Long
    RecipientCount As Long
    Recipients As Long
    FileCount As Long
    Files As Long
    End Type

    Declare Function
    MAPISendMail Lib "MAPI32" Alias "MAPISendMail" _
    ( Byval hSession As Long, Byval UI As Long, message As Any _
    , Byval flags As Long, Byval zR As Long) As Long

    Declare Function
    AddressOf Lib "MSVCRT" Alias "labs" _
    ( V As Any) As Long

    Declare Sub
    PokeString Lib "MSVCRT" Alias "memcpy" _
    ( D As Any, Byval S As String, Byval N As Long)


    Sub
    Click(Source As Button)
    sendto$ = {"Fredd Bloggs" <fredd@bloggs.com>}
    Dim Csendto As CString
    PokeString Csendto.data
    (0), sendto$, Len(sendto$)

    subject$ = "Just testing"
    Dim Csubject As CString
    PokeString Csubject.data
    (0), subject$, Len(subject$)

    body$ = "Hello!"
    Dim Cbody As CString
    PokeString Cbody.data
    (0), body$, Len(body$)

    Dim
    Msendto As MAPIUser
    Msendto.Name
    = AddressOf(Csendto)
    Msendto.Class = MAPI_TO

    Dim msg As MAPIMessage
    msg.Subject
    = AddressOf(Csubject)
    msg.Body = AddressOf(Cbody)
    msg.RecipientCount = 1
    msg.Recipients
    = AddressOf(Msendto)

    MAPISendMail 0, 0, msg, 0, 0
    End Sub




Mapi Sample Program (~Pippy Cisrekon... 15.Jan.04)
. . RE: Mapi Sample Program (~Kirk Elreterod... 15.Jan.04)
. . . . RE: Mapi Sample Program (~Pippy Cisrekon... 15.Jan.04)
. . . . . . RE: Mapi Sample Program (~Mario Lopkiste... 15.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS